package com.whale.controller.user;


import com.whale.entity.ReserveDetail;
import com.whale.mapper.VenueOccupyMapper;
import com.whale.result.Result;
import com.whale.service.VenueOccupyService;
import com.whale.vo.VenceOccupyVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@Api(tags="预约场地占用接口")
@RestController("userVenueOccupyController")
@RequestMapping("/user/venueOccupy")
@Slf4j
public class VenueOccupyController {


    @Autowired
    private VenueOccupyService venueOccupyService;


    /**
     * 查看所有占用场地详细
     */
    @GetMapping("/allOccupy")
    @ApiOperation("预约占用")
    public Result<List<VenceOccupyVO>> allOccupy(){
        List<VenceOccupyVO> reserveDetails= venueOccupyService.allOccupy();
        return Result.success(reserveDetails);
    }


}
